package com.adu.miniospringbootstarter.config;

import com.adu.miniospringbootstarter.service.MinioService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(MinioProperties.class)
public class MinioConfiguration {
    @Autowired
    MinioProperties minioProperties;

    @Bean
    public MinioService getService(){
        return new MinioService(minioProperties);
    }

}
